package cn.topcodes.tcsf.app.service.impl;

import cn.topcodes.tcsf.admin.commons.generic.GenericService;
import cn.topcodes.tcsf.app.domain.entity.AppOperateLog;
import cn.topcodes.tcsf.app.service.AppOperateLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Unicorn on 2017/7/26.
 */
@Service("appOperateLogService")
public class AppOperateLogServiceImpl extends GenericService<AppOperateLog> implements AppOperateLogService {


    @Override
    @Transactional(readOnly = false, rollbackFor = Exception.class)
    public void record(Long appUserId, String ip, String type, String content) {
        AppOperateLog log = new AppOperateLog();
        log.setUserId(appUserId);
        log.setIp(ip);
        log.setType(type);
        log.setContent(content);
        this.create(log);
    }
}
